import axios from 'axios'
// 模拟登陆请求头
// interface getConfig {
//     headers:{}
// }

class baseRequest {
    constructor() {
    }

    get(url: string, session: string) {

        return axios(url, {
            headers: {
                Cookie: session
            }
        })
    }

    post(url: string, session: string, data?: {}) {
        return axios.post(url, data, {
            headers: {
                Cookie: session,
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    }
}

export default new baseRequest()
